<?php
if (file_exists("data/conf/db.php")) {
    $db = include "data/conf/db.php";
} else {
    $db = [];
}
if (file_exists("data/conf/config.php")) {
    $runtime_config = include "data/conf/config.php";
} else {
    $runtime_config = [];
}

if (file_exists("data/conf/route.php")) {
    $routes = include 'data/conf/route.php';
} else {
    $routes = [];
}

$configs = [
    "LOAD_EXT_FILE"        => "extend",
    'UPLOADPATH'           => 'data/upload/',
    //'SHOW_ERROR_MSG'        =>  true,    // 显示错误信息
    'SHOW_PAGE_TRACE'      => false,
    'TMPL_STRIP_SPACE'     => true,// 是否去除模板文件里面的html空格与换行
    'THIRD_UDER_ACCESS'    => false, //第三方用户是否有全部权限，没有则需绑定本地账号
    /* 标签库 */
    'TAGLIB_BUILD_IN'      => THINKCMF_CORE_TAGLIBS,
    'MODULE_ALLOW_LIST'    => [
        'Admin', 'Portal', 'Asset', 'Api', 'User', 'Wx', 'Comment',
        'Qiushi', 'Tpl', 'Topic', 'Install', 'Bug', 'Better', 'Pay',
        'Cas', 'System', 'AppApi', 'Wap','Goods','Web','Notify',
    ],
    'TMPL_DETECT_THEME'    => false,       // 自动侦测模板主题
    'TMPL_TEMPLATE_SUFFIX' => '.html',     // 默认模板文件后缀
    'DEFAULT_MODULE'       => 'Web',  // 默认模块
    'DEFAULT_CONTROLLER'   => 'Index', // 默认控制器名称
    'DEFAULT_ACTION'       => 'index', // 默认操作名称
    'DEFAULT_M_LAYER'      => 'Model', // 默认的模型层名称
    'DEFAULT_C_LAYER'      => 'Controller', // 默认的控制器层名称

    'DEFAULT_FILTER' => 'htmlspecialchars', // 默认参数过滤方法 用于I函数...htmlspecialchars

    'LANG_SWITCH_ON'       => true,   // 开启语言包功能
    'DEFAULT_LANG'         => 'zh-cn', // 默认语言
    'LANG_LIST'            => 'zh-cn,en-us,zh-tw',
    'LANG_AUTO_DETECT'     => true,
    'ADMIN_LANG_SWITCH_ON' => false,   // 后台开启语言包功能

    'VAR_MODULE'     => 'g',     // 默认模块获取变量
    'VAR_CONTROLLER' => 'm',    // 默认控制器获取变量
    'VAR_ACTION'     => 'a',    // 默认操作获取变量

    'APP_USE_NAMESPACE'  => true, // 关闭应用的命名空间定义
    'APP_AUTOLOAD_LAYER' => 'Controller,Model', // 模块自动加载的类库后缀

    'SP_TMPL_PATH'                 => 'themes/',       // 前台模板文件根目录
    'SP_DEFAULT_THEME'             => 'simplebootx',       // 前台模板文件
    'SP_TMPL_ACTION_ERROR'         => 'error', // 默认错误跳转对应的模板文件,注：相对于前台模板路径
    'SP_TMPL_ACTION_SUCCESS'       => 'success', // 默认成功跳转对应的模板文件,注：相对于前台模板路径
    'SP_ADMIN_STYLE'               => 'flat',
    'SP_ADMIN_TMPL_PATH'           => 'admin/themes/',       // 各个项目后台模板文件根目录
    'SP_ADMIN_DEFAULT_THEME'       => 'simplebootx',       // 各个项目后台模板文件
    'SP_ADMIN_TMPL_ACTION_ERROR'   => 'Admin/error.html', // 默认错误跳转对应的模板文件,注：相对于后台模板路径
    'SP_ADMIN_TMPL_ACTION_SUCCESS' => 'Admin/success.html', // 默认成功跳转对应的模板文件,注：相对于后台模板路径
    'TMPL_EXCEPTION_FILE'          => SITE_PATH . 'public/exception.html',

    'AUTOLOAD_NAMESPACE' => ['plugins' => './plugins/'], //扩展模块列表

    'ERROR_PAGE' => '',//不要设置，否则会让404变302

    'VAR_SESSION_ID' => 'session_id',

    "UCENTER_ENABLED"       => 0, //UCenter 开启1, 关闭0
    "COMMENT_NEED_CHECK"    => 0, //评论是否需审核 审核1，不审核0
    "COMMENT_TIME_INTERVAL" => 60, //评论时间间隔 单位s

    /* URL设置 */
    'URL_CASE_INSENSITIVE'  => true,   // 默认false 表示URL区分大小写 true则表示不区分大小写
    'URL_MODEL'             => 0,       // URL访问模式,可选参数0、1、2、3,代表以下四种模式：
    // 0 (普通模式); 1 (PATHINFO 模式); 2 (REWRITE  模式); 3 (兼容模式)  默认为PATHINFO 模式，提供最好的用户体验和SEO支持
    'URL_PATHINFO_DEPR'     => '/',    // PATHINFO模式下，各参数之间的分割符号
    'URL_HTML_SUFFIX'       => '',  // URL伪静态后缀设置

    'VAR_PAGE' => "p",

    'URL_ROUTER_ON'   => true,
    'URL_ROUTE_RULES' => $routes,

    /*性能优化*/
    'OUTPUT_ENCODE'   => true,// 页面压缩输出

    'HTML_CACHE_ON'    => false, // 开启静态缓存
    'HTML_CACHE_TIME'  => 60,   // 全局静态缓存有效期（秒）
    'HTML_FILE_SUFFIX' => '.html', // 设置静态缓存文件后缀

    'TMPL_PARSE_STRING' => [
        '__UPLOAD__'   => __ROOT__ . '/data/upload/',
        '__STATICS__'  => __ROOT__ . '/statics/',
        '__WEB_ROOT__' => __ROOT__,
    ],
    //短信配置
    'SMS_ACCOUNT' => [
        'company'  => '氦闪潮流运动',
        //凌凯短信
//        'uid' => 'CDJS006661',
        'uid' => 'CDJS007328',
        'pwd' => 'zm0513@',
        'getway' => 'https://sdk2.028lk.com/sdk2/BatchSend2.aspx?',
    ],

    //微信配置参数
    'WEIXINPAY_CONFIG'       => array(
        'APPID'              => 'wx33a9809858c05140', // 微信支付APPID
        'MCHID'              => '1516454951', // 微信支付MCHID 商户收款账号
        'KEY'                => 'OwcmK2Nt2I4OGrvwjDYMwkAJswxJF8Cq', // 微信支付KEY
        'APPSECRET'          => 'c424e64323fe3f1aa63d622717494636', // 公众帐号secert (公众号支付专用)
        'NOTIFY_URL'         => 'https://www.haishansport.com/Notify/Wxpay/index', // 接收支付状态的连接
//        'NOTIFY_RECHARGE_URL'=> 'http://syb.cdth.cn/Notify/WxRecharge/index',
        'NOTIFY_RECHARGE_URL'=> 'https://www.haishansport.com/Notify/WxRecharge/index',
    ),
    //阿里支付
    'ALIPAY_CONFIG' => [
        'partner'               => '2088331080104563',
        'seller_id'             => '2088331080104563',
        'key'                   => '2eswh53vjtgvpaicnl73ddihe4bxlnmw',
        'seller_email'          => '1252656343@qq.com',
        'sign_type'             => strtolower('RSA'),
        'input_charset'         => strtolower('utf-8'),
        'cacert'                => '',
        'rsa_private_key'       => getcwd() . '/simplewind/Core/Library/Vendor/Alipay/lib/rsa_private_key.pem',
        'rsa_public_key'        => getcwd() . '/simplewind/Core/Library/Vendor/Alipay/lib/rsa_public_key.pem',
        'rsa_private_key_pkcs8' => getcwd() . '/simplewind/Core/Library/Vendor/Alipay/lib/rsa_private_key_pkcs8.pem',
        'transport'             => 'http',
//        'notify_url'            => 'http://syb.cdth.cn/Notify/Alipay/index', //支付回调地址
        'notify_url'            => 'https://www.haishansport.com/Notify/Alipay/index', //支付回调地址
//        'notify_recharge_url'   => 'http://syb.cdth.cn/Notify/AlipayRecharge/index', //充值回调地址
        'notify_recharge_url'   => 'https://www.haishansport.com/Notify/AlipayRecharge/index', //充值回调地址
        'return_url'            => 'm.alipay.com',
        'ali_public_key'        => 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB',
        //商户私钥，您的原始格式RSA私钥
        'merchant_private_key' => "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQClzS8Rwd2+WAJLNnAYVdKQNslrjuS3FieARo64oQ2J8882EmktMe3gqvSX/FQ/bLC/SeEGlXQcWkIZdjTJmgXYKn4Q1nOtgfbVqa/6O925xJf6WinvNQjaIioiis7dvKNbRA794l7N5GImZZ9IdG+PNORcPsmKJjmDYX1Cdwcjh/rTKgwuZ6CuBd7C8euRnAUQTUutUbk5V4SDoBD4P9tA0+Ocf1ezRscZPIj48nC9L7FjqpIg87TSUhgdIZFk/TccH6J/AgW3Xp6VXDBj4XltKahe+kGUZniJAtlWk/M0FiTUZbQXsk6SASvc3DxhOQ/Y/sCYgvU1dNJabw0F6T5vAgMBAAECggEARATHGJvV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iUq7/3EiZGhQebJJGHRHVHzu1AabruWGeKUyo+3+RWH7HMSVg6boP7kU7uriolbELYL5p+clp7HFwSWv7R/AceCPowFrBmR9NjuErshHFG74ZlDg1X1WnoGDhH73+mosgxAdXunK8=",
        //支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
        'alipay_public_key' => "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsm6+CUswBhDhE8R0JRI3dl16+loAefmEKJwYz2PsxP411NdY495jFtV3ME1CX/azsi8CzhP2ktGErxjC80KNo5BXswITfEBV5+4W6jriEwaeitruVsv76l2vPk2HuBUhP1TZZ5xTiEAudXer2BAbkYVjwepR+LJar4rkH1G2bQ/MTyxg/GB44/R1iwaGw1j3bC6KfXWFM/djDuZq9LouaDIem5PazLxX4aU/9WWNKs6Ibp5/Yc7GV2c90/z4tM4SKuQBbFJQtlVDw+HHxNMvmUH7HW/B+vx9GQA5uRVlaRd6PvSodEoK3Higmhjm1XKwhvtoMjF5w+bag2g79YpenQIDAQAB",
    ],

    //支付宝配置参数
    'alipay_config'=>array(
        'partner'       =>'2088331080104563',   //这里是你在成功申请支付宝接口后获取到的PID；
        'seller_id'     => '2088331080104563',
        'key'           =>'2eswh53vjtgvpaicnl73ddihe4bxlnmw',//这里是你在成功申请支付宝接口后获取到的Key
        'sign_type'     =>strtoupper('MD5'),
        'input_charset' => strtolower('utf-8'),
        'cacert'        => getcwd().'\\cacert.pem',
        'transport'     => 'http',
        'rsa_private_key'       => getcwd() . '/simplewind/Core/Library/Vendor/Alipay/lib/rsa_private_key.pem',
        'rsa_public_key'        => getcwd() . '/simplewind/Core/Library/Vendor/Alipay/lib/rsa_public_key.pem',
        'rsa_private_key_pkcs8' => getcwd() . '/simplewind/Core/Library/Vendor/Alipay/lib/rsa_private_key_pkcs8.pem',
//        'notify_url'            => 'http://syb.cdth.cn/Notify/Alipay/index', //支付回调地址
        'notify_url'            => 'https://www.haishansport.com/Notify/Alipay/index', //支付回调地址
//        'notify_recharge_url'   => 'http://syb.cdth.cn/Notify/AlipayRecharge/index', //充值回调地址
        'notify_recharge_url'   => 'https://www.haishansport.com/Notify/AlipayRecharge/index', //充值回调地址
        'return_url'            => 'm.alipay.com',
        'ali_public_key'        => 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB',
        'app_id'                => '2018101161609898',
        //商户私钥，您的原始格式RSA私钥
        'merchant_private_key' => "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQClzS8Rwd2+WAJLNnAYVdKQNslrjuS3FieARo64oQ2J8882EmktMe3gqvSX/FQ/bLC/SeEGlXQcWkIZdjTJmgXYKn4Q1nOtgfbVqa/6O925xJf6WinvNQjaIioiis7dvKNbRA794l7N5GImZZ9IdG+PNORcPsmKJjmDYX1Cdwcjh/rTKgwuZ6CuBd7C8euRnAUQTUutUbk5V4SDoBD4P9tA0+Ocf1ezRscZPIj48nC9L7FjqpIg87TSUhgdIZFk/TccH6J/AgW3Xp6VXDBj4XltKahe+kGUZniJAtlWk/M0FiTUZbQXsk6SASvc3DxhOQ/Y/sCYgvU1dNJabw0F6T5vAgMBAAECggEARATHGJvV4m6skjqFBha/SVaQj0WR4uJ91gwcJPY9XajeCyrGZzoigpbfvTJRRavLXs5qOI87kR4eG9/4i/RaDXJxQWsZDcdRghoZDaldrwZN6vDuXyn8tbBqZL1ZXHI0+g4TsGgbyI+3DFWIYOsTkUZ7oLRJbhl8Yr+t6YR3M0W8PbwCNIy8Jxdk4nqoiC756EbgARZqim1stwDSICIukMpjaZtc+xBuMKLjo9qnxZCjxqL8wP1iDjykzO5LhjCWOtyqN8mJJLiVydQdnIvWvkxPNEZRrSlRGVtRTVhSWbaDd6QkMyV7sRyR3MQDtdKug28otRBJJM+XrV7m3GaJ0QKBgQD0uGwsJthTu5jJBp9yFWrQxeEkqOQQw9y1nDARovZ7oViwhxKh9tQPYC+EjPIFC5o/rI0jzhU8uzpjG4JQlZEj5IuS8KC/QbDXjIoNJeHgkjXo5nbm87omoyRLr+GzwU2k1gwuBEwit/7aZhauUdZRtOIrt33ICCo+BkAfG7jjDQKBgQCtcY7bjIy5GI4k+LaJrtos2hQEW9VaTADrdwxGi9fKzw/BQvMwRrCFP237xOStlOaJgeGo3P1AlRiN23LgtnlrpAWWSKBgR7ERL3X0PKHt9XNS/oG8XPbpCeobO3d2v/7vCLGob9HQwvHugHwoQXwudS6wwaCWYY7wwZT7BfW4awKBgBG5xgQQsDyoavGsrCHsUTdcDenE3fgk57iz3nt4jVf5IN5wejYHFecjNW3pc6JP69VO305HoBwtB5akKHVD0CaEaGO1UD9qN6/1Ow6mvsywan07LEOgRcyEpp1g2P1XNBOLeYhfwVAGecxB9sSbouV6L6Ow/8hcZwrlEwHt1R+FAoGAP+OduPfr+l62NZ48NzlmerEWQIjHbYyjphjjN7VZlwZxCkKsLDNN4Ld9vwlHJz27Mhna0wYcb8a8Fb0pcuckkOcJe9Ni6DRgYDE4ZPBUwb/xbDf9+DHSbgNN7hwYpHCS6uAr+Ry/kAPPdIh1s6pzoPVfbpLUobBsI/la9KC8Y+MCgYEAkW62bRPSUE5iNA42ILN5fCC+UrBkqz2+xdiUq7/3EiZGhQebJJGHRHVHzu1AabruWGeKUyo+3+RWH7HMSVg6boP7kU7uriolbELYL5p+clp7HFwSWv7R/AceCPowFrBmR9NjuErshHFG74ZlDg1X1WnoGDhH73+mosgxAdXunK8=",
        //支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
        'alipay_public_key' => "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsm6+CUswBhDhE8R0JRI3dl16+loAefmEKJwYz2PsxP411NdY495jFtV3ME1CX/azsi8CzhP2ktGErxjC80KNo5BXswITfEBV5+4W6jriEwaeitruVsv76l2vPk2HuBUhP1TZZ5xTiEAudXer2BAbkYVjwepR+LJar4rkH1G2bQ/MTyxg/GB44/R1iwaGw1j3bC6KfXWFM/djDuZq9LouaDIem5PazLxX4aU/9WWNKs6Ibp5/Yc7GV2c90/z4tM4SKuQBbFJQtlVDw+HHxNMvmUH7HW/B+vx9GQA5uRVlaRd6PvSodEoK3Higmhjm1XKwhvtoMjF5w+bag2g79YpenQIDAQAB",


    ),


    //以上配置项，是从接口包中alipay.config.php 文件中复制过来，进行配置；

    'alipay'   =>array(
        //这里是卖家的支付宝账号，也就是你申请接口时注册的支付宝账号
        'seller_email'=>'1252656343@qq.com',
        //这里是异步通知页面url，提交到项目的Pay控制器的notifyurl方法；
        /*'notify_url'=>'http://syb.cdth.cn/Notify/Alipay/index',
        'notify_recharge'=>'http://syb.cdth.cn/Notify/AlipayRecharge/index',
        //这里是页面跳转通知url，提交到项目的Pay控制器的returnurl方法；
        'return_url'=>'http://syb.cdth.cn/Notify/Alipay/index',
        'return_url_recharge'=>'http://syb.cdth.cn',
        //支付成功跳转到的页面，我这里跳转到项目的User控制器，myorder方法，并传参payed（已支付列表）
        'successpage'=>'http://syb.cdth.cn',
        //支付失败跳转到的页面，我这里跳转到项目的User控制器，myorder方法，并传参unpay（未支付列表）
        'errorpage'=>'http://syb.cdth.cn',*/

        'notify_url'=>'https://www.haishansport.com/Notify/Alipay/index',
        'notify_recharge'=>'https://www.haishansport.com/Notify/AlipayRecharge/index',
        //这里是页面跳转通知url，提交到项目的Pay控制器的returnurl方法；
        'return_url'=>'https://www.haishansport.com/Web/Cart/over',
        'return_url_recharge'=>'https://www.haishansport.com/Web/Cart/over',
        //支付成功跳转到的页面，我这里跳转到项目的User控制器，myorder方法，并传参payed（已支付列表）
        'successpage'=>'https://www.haishansport.com/Web/Cart/over',
        //支付失败跳转到的页面，我这里跳转到项目的User控制器，myorder方法，并传参unpay（未支付列表）
        'errorpage'=>'https://www.haishansport.com/Web/Index/user',
    ),

    'PAGE_NUMBER' => 50,
];

return array_merge($configs, $db, $runtime_config);
